<!-- saved from url=(0022)http://internet.e-mail -->
<%@ page import="java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Fixation Summary</title>
<style type="text/css">
<!--
.style3 {
	font-family: Arial;
	font-size: 12px;
}
.style4 {font-weight: bold}
.style5 {font-family: Arial; font-size: 12px; font-weight: bold; }
-->
</style>
</head>
<body>
		<table width="100%"  border="1" cellspacing="0" cellpadding="0">
		  <%
		  	ResultSet Rs = task.getGradeList();
			float sum_stk_ton = 0;
			float chk_pton =0;
			float chk_ston =0;
			float stk_ton =0;
			int qid =0;
			int mth  = 1;
			
			float Tot1 = 0;
			float Tot2 = 0;
			float Tot3 = 0;
			float Tot4 = 0;	
			float Tot5 = 0;
			float Tot6 = 0;
			float Tot7 = 0;
			float Tot8 = 0;
			float Tot9 = 0;
			float Tot10 = 0;
			float Tot11 = 0;
			float Tot12 = 0;			
			
			float MP_Bef = 0;
			float MP_Aft = 0;
			float MS_Bef = 0;
			float MS_Aft = 0;

			if (request.getParameter("quality") != null) qid = Utils.strToInt(request.getParameter("quality"));
			Rs.beforeFirst();
			int dloop=1;
			while (Rs.next())
			{
				chk_pton = task.getChkTon("contracts","pending_tons",qid,Rs.getInt("id"),"P");
				chk_ston = task.getChkTon("contracts","tons-inv_tons",qid,Rs.getInt("id"),"S");
				stk_ton = task.getStock(qid,Rs.getInt("id"));
				
				if ((chk_pton > 0) || (chk_ston > 0) || (stk_ton > 0))
				{
					float MP1 = 0;
					float MPD1 = 0;
					
					float MP2 = 0;
					float MPD2 = 0;
					
					float MP3 = 0;
					float MPD3 = 0;
					
					float MP4 = 0;
					float MPD4 = 0;
						
					float MP5 = 0;
					float MPD5 = 0;
					
					float MP6 = 0;
					float MPD6 = 0;
					
					float MP7 = 0;
					float MPD7 = 0;
					
					float MP8 = 0;
					float MPD8 = 0;
					
					float MP9 = 0;
					float MPD9 = 0;
					
					float MP10 = 0;
					float MPD10 = 0;
					
					float MP11 = 0;
					float MPD11 = 0;
					
					float MP12 = 0;	
					float MPD12 = 0;
					
					float MS1 = 0;
					float MSD1 = 0;
					
					float MS2 = 0;
					float MSD2 = 0;
					
					float MS3 = 0;
					float MSD3 = 0;
					
					float MS4 = 0;
					float MSD4 = 0;
						
					float MS5 = 0;
					float MSD5 = 0;
					
					float MS6 = 0;
					float MSD6 = 0;
					
					float MS7 = 0;
					float MSD7 = 0;
					
					float MS8 = 0;
					float MSD8 = 0;
					
					float MS9 = 0;
					float MSD9 = 0;
					
					float MS10 = 0;
					float MSD10 = 0;
					
					float MS11 = 0;
					float MSD11 = 0;
					
					float MS12 = 0;				
					float MSD12 = 0;
					
					MP_Bef = task.getSumNDRReport_Before("contracts","pending_tons", qid, Rs.getInt("id"), MonthOne,"P");
					
					MP1 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthOne, MonthTwo,"P");
					MPD1 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthOne, MonthTwo,"P");
					
					MP2 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthTwo, MonthThree,"P");
					MPD2 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthTwo, MonthThree,"P");
					
					MP3 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthThree, MonthFour,"P");
					MPD3 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthThree, MonthFour,"P");
					
					MP4 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthFour, MonthFive,"P");	
					MPD4 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthFour, MonthFive,"P");	
					
					MP5 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthFive, MonthSix,"P");
					MPD5 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthFive, MonthSix,"P");
					
					MP6 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthSix, MonthSeven,"P");
					MPD6 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthSix, MonthSeven,"P");
					
					MP7 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthSeven, MonthEight,"P");
					MPD7 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthSeven, MonthEight,"P");
					
					MP8 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthEight, MonthNine,"P");
					MPD8 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthEight, MonthNine,"P");
					
					MP9 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthNine, MonthTen,"P");
					MPD9 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthNine, MonthTen,"P");
					
					MP10 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthTen, MonthEleven,"P");
					MPD10 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthTen, MonthEleven,"P");
					
					MP11 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthEleven, MonthTwelve,"P");
					MPD11 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthEleven, MonthTwelve,"P");
					
					MP12 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthTwelve, MonthThirteen,"P");	
					MPD12 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential", qid, Rs.getInt("id"), MonthTwelve, MonthThirteen,"P");	
					
					MP_Aft = task.getSumNDRReport_After("contracts", "pending_tons", qid, Rs.getInt("id"), MonthThirteen,"P");

					MS_Bef = task.getSumNDRReport_Before("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthOne,"S");			
																									
					MS1 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthOne, MonthTwo,"S");
					MSD1 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthOne, MonthTwo,"S");					
					
					MS2 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthTwo, MonthThree,"S");
					MSD2 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthTwo, MonthThree,"S");
															
					MS3 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthThree, MonthFour,"S");
					MSD3 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthThree, MonthFour,"S");
					
					MS4 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthFour, MonthFive,"S");
					MSD4 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthFour, MonthFive,"S");	
					
					MS5 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthFive, MonthSix,"S");
					MSD5 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthFive, MonthSix,"S");
					
					MS6 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthSix, MonthSeven,"S");
					MSD6 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthSix, MonthSeven,"S");
					
					MS7 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthSeven, MonthEight,"S");
					MSD7 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthSeven, MonthEight,"S");
					
					MS8 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthEight, MonthNine,"S");
					MSD8 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthEight, MonthNine,"S");
					
					MS9 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthNine, MonthTen,"S");
					MSD9 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthNine, MonthTen,"S");
					
					MS10 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthTen, MonthEleven,"S");
					MSD10 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential", qid, Rs.getInt("id"), MonthTen, MonthEleven,"S");
					
					MS11 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthEleven, MonthTwelve,"S");
					MSD11 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons", "(tons-inv_tons)*differential",qid, Rs.getInt("id"), MonthEleven, MonthTwelve,"S");
					
					MS12 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthTwelve, MonthThirteen,"S");
					MSD12 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons", "(tons-inv_tons)*differential",qid, Rs.getInt("id"), MonthTwelve, MonthThirteen,"S");
					
					MS_Aft = task.getSumNDRReport_After("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthThirteen,"S");
										
					Tot1 = Tot1+(MP_Bef-MS_Bef)+(MP1 - MS1);		
					Tot2 = Tot2+(MP2 - MS2);
					Tot3 = Tot3+(MP3 - MS3);
					Tot4 = Tot4+(MP4 - MS4);
					Tot5 = Tot5+(MP5 - MS5);
					Tot6 = Tot6+(MP6 - MS6);
					Tot7 = Tot7+(MP7 - MS7);
					Tot8 = Tot8+(MP8 - MS8);
					Tot9 = Tot9+(MP9 - MS9);
					Tot10 = Tot10+(MP10 - MS10);
					Tot11 = Tot11+(MP11 - MS11);
					Tot12 =(Tot12+MP_Aft-MS_Aft)+(MP12 - MS12);			
					sum_stk_ton=sum_stk_ton+stk_ton;				
					String ColId = Rs.getInt("id") + "+" + Utils.dateToStr(MonthTwo);
					String ColId2 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthThree);
					String ColId3 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthFour);
					String ColId4 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthFive);
					String ColId5 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthSix);
					String ColId6 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthSeven);
					String ColId7 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthEight);
					String ColId8 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthNine);
					String ColId9 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthTen);
					String ColId10 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthEleven);
					String ColId11 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthTwelve);
					String ColId12 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthThirteen);
		  %>
          		<tr bordercolor="#EEEEEE">
           			<td width="18%" class="style1"><%=Rs.getString("name")%></td>
            		<td width="9%" align="right" class="style1"><em>Purchase</em></td>
            		<td width="3%" align="right" class="style1"><%=task.FormatZero(stk_ton,0)%></td>
            		<td width="3%" align="right" class="style1">&nbsp;</td>
            		<td id= "<%=ColId%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP1+MP_Bef,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD1)%></td>
            		<td id= "<%=ColId2%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP2,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD2)%></td>
            		<td id= "<%=ColId3%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP3,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD3)%></td>
            		<td id= "<%=ColId4%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP4,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD4)%></td>
            		<td id= "<%=ColId5%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP5,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD5)%></td>
            		<td id= "<%=ColId6%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP6,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD6)%></td>
            		<td id= "<%=ColId7%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP7,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD7)%></td>
            		<td id= "<%=ColId8%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP8,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD8)%></td>
            		<td id= "<%=ColId9%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP9,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD9)%></td>
            		<td id= "<%=ColId10%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP10,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD10)%></td>
            		<td id= "<%=ColId11%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP11,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD11)%></td>
            		<td id= "<%=ColId12%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP12+MP_Aft,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MPD12)%></td>
            		<td width="3%" align="right" class="style1"><%=task.FormatZero(chk_pton+stk_ton,0)%></td>
          			<td width="2%" align="center" valign="middle" class="style1">&nbsp;</td>
          			<td width="2%">&nbsp;</td>
					
          		</tr>
				
          		<tr bordercolor="#EEEEEE">
           			<td width="18%" class="style1">&nbsp;</td>
            		<td width="9%" align="right" class="style1"><em>Sales</em></td>
            		<td width="3%" align="right">&nbsp;</td>
            		<td width="3%" align="right">&nbsp;</td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS1+MS_Bef,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD1,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId2%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS2,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD2,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId3%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS3,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD3,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId4%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS4,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD4,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId5%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS5,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD5,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId6%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS6,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD6,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId7%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS7,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD7,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId8%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS8,0)%></a></td>
            		<td width="2%" align="right" class="style1"  onClick="selectRowCol(this);"><%=task.FormatZero(MSD8,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId9%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS9,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD9,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId10%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS10,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD10,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId11%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS11,0)%></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD11,0)%></td>
            		<td width="3%" align="right" class="style1" id= "<%=ColId12%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS12+MS_Aft,0)%></a></td>
            		<td width="2%" align="right" class="style1" onClick="selectRowCol(this);"><%=task.FormatZero(MSD12,0)%></td>
            		<td width="3%" align="right" class="style1"><%=task.FormatZero(chk_ston,0)%></td>
          			<td width="2%" align="center" valign="middle" class="style1">&nbsp;</td>
          			<td width="2%">&nbsp;</td>					
          		</tr>
				
          		<tr bordercolor="#EEEEEE">
           		  <td width="18%" class="style1">&nbsp;</td>
            	  <td width="9%" align="right" bordercolor="#BBBBBB" class="style3"><strong>Total</strong></td>
            	  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(stk_ton,0,false)%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
       		      <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(((MP1+MP_Bef)-(MS1+MS_Bef)),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP2-MS2),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP3-MS3),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP4-MS4),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP5-MS5),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP6-MS6),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP7-MS7),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP8-MS8),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP9-MS9),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP10-MS10),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((MP11-MS11),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(((MP12+MP_Aft)-(MS12+MS_Aft)),0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr((stk_ton)+((MP1+MP_Bef)-(MS1+MS_Bef))+(MP2-MS2)+(MP3-MS3)+(MP4-MS4)+(MP5-MS5)+(MP6-MS6)+(MP7-MS7)+(MP8-MS8)+(MP9-MS9)+(MP10-MS10)+(MP11-MS11)+((MP12+MP_Aft)-(MS12+MS_Aft)),0,false)%></td>
          		  <td width="2%" align="center" valign="middle" class="style1">&nbsp;</td>
          		  <td width="2%">&nbsp;</td>					  
       		</tr>
		<%
					dloop=dloop+1;
				}
						
			}
		%>
          		<tr bordercolor="#EEEEEE">
           		  <td width="18%" class="style1">&nbsp;</td>
            	  <td width="9%" align="right" bordercolor="#BBBBBB" class="style5">Grand Total</td>
            	  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(sum_stk_ton,0,false)%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
       		      <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot1,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot2,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot3,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot4,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot5,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot6,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot7,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot8,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot9,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot10,0,false)%></td>
            	  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
            	  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot11,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
       		      <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot12,0,false)%></td>
           		  <td width="2%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=Utils.numberToStr(Tot1+Tot2+Tot3+Tot4+Tot5+Tot6+Tot7+Tot8+Tot9+Tot10+Tot11+Tot12,0,false)%></td>
          		  <td width="2%" align="center" valign="middle" class="style1">&nbsp;</td>
          		  <td width="2%">&nbsp;</td>					  
       		</tr>
        </table>
</body>
</html>
